package cn.secondquestion;

public class Rectangle extends Graph{

    public Rectangle(){

    }

    public Rectangle(int h, int l) {
        super(h, l);
    }

    public void area(){
        int s=getH()*getL();
        System.out.println("长方形的面积为:"+s);
    }
    public void  perimeter(){
        int l=(getH()+getL())*2;
        System.out.println("长方形的周长为:"+l);
    }
}
